#include <utility>

#include <utility>

//
// Created by Never on 2019/7/25.
//

#ifndef GOAL_LKH_CVRPMD_PARAMETER_H
#define GOAL_LKH_CVRPMD_PARAMETER_H

#include <string>
#include "Graph.h"
using namespace std;

namespace CVRPMDStructure{
    using Coord = double;
    using Coord2D = szx::Graph::Coord2D<Coord>;
    struct CVRPMDConfig{
        explicit CVRPMDConfig(string InitialAlgorithm = "CVRPMD_ALG", int MaxTrials = 1000, int TraceLevel = 1,
                bool isExitWhenSolIsFeasible = false) :
        InitialAlgorithm(std::move(InitialAlgorithm)), MaxTrials(MaxTrials), TraceLevel(TraceLevel),
        isExitWhenSolIsFeasible(isExitWhenSolIsFeasible)
        {
            Gain23Used = 0;
            KickType = 4;
            MaxSwaps = 0;
            MoveType = 5;
            MoveTypeSpecial = 1;
            MaxPopulationSize = 0;
            Runs = 1;
        }
        int Gain23Used;
        int KickType;
        int MaxSwaps;
        int MoveType;
        int MoveTypeSpecial;
        int MaxPopulationSize;
        int Runs;
        string InitialAlgorithm;
        int MaxTrials;
        int TraceLevel;
        bool isExitWhenSolIsFeasible;
    };
    struct CVRPMDParameter{
        CVRPMDParameter(int capacity, int vehicleCost,
                string name, string type, string typeInLKH="CVRPMD",
                string nodeCoordType="TWOD_COORDS", string edgeWeightType="CVRPMD_2D"):
                capacity(capacity), vehicleCost(vehicleCost), name(std::move(name)),
                originalType(std::move(type)), typeInLKH(std::move(typeInLKH)),
                nodeCoordType(std::move(nodeCoordType)), edgeWeightType(std::move(edgeWeightType)){}
        int capacity;
        int vehicleCost;
        string name;
        string originalType;
        string typeInLKH;
        string nodeCoordType;
        string edgeWeightType;
    };
    struct Depot{
        Depot(int capacity, int costs, int index, Coord2D coord,
                bool isOpen=true, int vehicleNumber=2) :
                capacity(capacity), costs(costs), index(index),
                coord(coord), isOpen(isOpen), vehicleNumber(vehicleNumber){}
        // these members should be read from the file
        int capacity;
        int costs;
        int index;
        Coord2D coord;
        // these two members should be assigned after the computation of model
        bool isOpen;
        int vehicleNumber;
    };
    struct Customer{
        Customer(int demand, int index, Coord2D coord):
                demand(demand), index(index), coord(coord){}
        int demand;
        int index;
        Coord2D coord;
    };
    using Customers = vector<Customer>;
    using Depots = vector<Depot>;
}


#endif //GOAL_LKH_CVRPMD_PARAMETER_H
